// 会员中心
import http from '../helper/http.js'
const path = '/api/adm/v1/'

// 会员中心列表
export let memberList = ({ startTime, endTime, searchType, name, page, num }) => {
  return http.post(`${path}member/search`, {
    start_time: startTime,
    end_time: endTime,
    search_type: searchType, // 0 所以符合条件  1 会员账号  2 会员名称 3 会员手机号 4 流水号
    name,
    page,
    num
  })
}

// 会员中心余额提现列表加筛选
export let mbwithdraw = ({ verifyType, startTime, endTime, searchType, page, name, num }) => {
  return http.post(`${path}mbwithdraw/search`, {
    verify_type: verifyType, // 审核状态 0全部 1 未处理 2 已审核 3已拒绝
    start_time: startTime,
    end_time: endTime,
    search_type: searchType, // 0 所以符合条件  1 会员账号  2 会员名称 3 会员手机号 4 流水号
    name,
    page,
    num
  })
}

// 会员中心余额提现提交审核
export let updateMbwithdraw = ({ id, memo, status }) => {
  return http.post(`${path}mbwithdraw/update`, {
    id,
    memo,
    status
  })
}

// 会员中心余额提现详情
export let getMbwithdrawDetail = ({ id }) => {
  return http.post(`${path}mbwithdraw/show`, {
    id
  })
}

// 会员中心状态修改
export let memberUpdate = ({ type, status, id }) => {
  return http.post(`${path}member/update`, {
    type,
    status,
    id
  })
}

// 会员中心余额提现导出 /api/adm/v1/mbwithdraw/export
export let mbwithdrawExport = (params) => {
  return http.post(`${path}mbwithdraw/export`, params)
}
